package org.zhigong.dto;

import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * Created by Administrator on 2018/4/11 0011.
 */
// 系统返回类,封装json,统一设定返回格式.
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SysResult<T>{

    private boolean success;

    private T data;

    private String error;

    public SysResult(boolean success, T data) {
        this.success = success;
        this.data = data;
    }

    public SysResult(boolean success, String error) {
        this.success = success;
        this.error = error;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getError() {
        return error;
    }

    public void setError(String error) {
        this.error = error;
    }
}
